<?php


namespace App\Http\Controllers\Api;


use App\Services\PrintTplService;
use Illuminate\Http\Request;

class PrintTplController extends BaseController
{
    /**
     * 分类标识
     * @var string
     */
    public function store(Request $request, PrintTplService $service) {
        return $service->store($request->input());
    }

    public function info(Request $request, PrintTplService $service, $id) {
        return $service->info($id, $request->query('abnormal') == 'false' ? false : true);
    }

    public function update(Request $request, PrintTplService $service, $id) {
        return $service->update($request->input(), $id);
    }

    public function destroy(PrintTplService $service, $id) {
        return $service->destroy($id);
    }

    public function paginate(Request $request, PrintTplService $service) {
        return $service->paginate($request->query(), $request->get('is_list', false));
    }
}
